﻿<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
	<title>会员中心</title>
	<link rel="stylesheet" href="/static/layui/css/layui.css">
	<link rel="stylesheet" type="text/css" id="css" href="/static/home/Css/user.css">
	<script type="text/javascript" src="/static/home/Scripts/jquery.js"></script>
	<script type="text/javascript" src="/static/home/Scripts/jquery.form.js"></script>
	<script src="/static/layui/layui.js"></script>
	<script src="/static/home/Scripts/sortable.min.js"></script>
</head>
<body>
<div id="lay-body">
<div class="layui-layout layui-layout-admin">
		
<div class="layui-header">
	<ul class="layui-nav layui-layout-left">
		<li class="layui-nav-item layadmin-flexible" lay-unselect="">
			<a href="javascript:;" id="flexible" title="侧边伸缩">
			<i class="layui-icon layui-icon-shrink-right" id="LAY_app_flexible"></i>
			</a>
		</li>
		<li class="layui-nav-item layui-hide-xs" lay-unselect="">
			<a href="/" target="_blank" title="前台">
			<i class="layui-icon layui-icon-website"></i>
			</a>
		</li>
		<li class="layui-nav-item" lay-unselect="">
			<a href="javascript:;" id="refresh" title="刷新">
			<i class="layui-icon layui-icon-refresh-3"></i>
			</a>
		</li>
		<span class="layui-nav-bar" style="width: 0px; left: 142px; opacity: 0; top: 48px;"></span>
	</ul>
	<ul class="layui-nav layui-layout-right">
	  <li class="layui-nav-item" style="margin-right:10px;">
		<a href="javascript:;">
		   <i class="layui-icon" style="font-size:16px; color: #aaa;">&#xe612;</i>
           {:session('username')}
		</a>
		<dl class="layui-nav-child">
		  <dd><a href="{:url('home/userm/outLogin')}" class="logout">退出</a></dd>
		</dl>
	  </li>
	</ul>
</div>		<div class="layui-side layui-side-menu">
	<div class="layui-side-scroll">
		<div class="layui-logo">
            会员中心
        </div>
		<ul class="layui-nav layui-nav-tree">
			<li class="layui-nav-item layui-nav-itemed">
				<a class="" href="javascript:;">首页</a>
				<dl class="layui-nav-child">
					<dd ><a href="user.php?m=index">会员首页</a></dd>
				</dl>
			</li>
			<li class="layui-nav-item layui-nav-itemed">
				<a class="" href="javascript:;">我是买家</a>
				<dl class="layui-nav-child">
					<dd ><a href="user.php?m=mysubscribe&a=list">我的预约</a></dd>
					<dd ><a href="user.php?m=mybargain&a=list">我的砍价</a></dd>
					<dd ><a href="user.php?m=myloan&a=list">我的贷款</a></dd>
					<dd ><a href="user.php?m=collect&a=list">我的收藏</a></dd>
				</dl>
			</li>
			<li class="layui-nav-item layui-nav-itemed">
				<a class="" href="javascript:;">我是卖家</a>
				<dl class="layui-nav-child">
					<dd ><a href="user.php?m=cars&a=list">车源管理</a></dd>
					<dd ><a href="user.php?m=subscribe&a=list">预约管理</a></dd>
					<dd ><a href="user.php?m=bargain&a=list">砍价管理</a></dd>
					<dd ><a href="user.php?m=loan&a=list">贷款管理</a></dd>
				</dl>
			</li>
			<li class="layui-nav-item layui-nav-itemed">
				<a class="" href="javascript:;">用户中心</a>
				<dl class="layui-nav-child">
					<dd ><a href="user.php?m=userinfo&a=upinfo">基本资料</a></dd>
					<dd ><a href="user.php?m=userinfo&a=certifyf">身份认证</a></dd>
					<dd class="layui-this"><a href="user.php?m=userinfo&a=uppwd">修改密码</a></dd>
				</dl>
			</li>
		</ul>
    </div>
</div>		<div class="layadmin-body-shade"></div>
		<div class="layui-body">
																																														<script type="text/javascript">

	layui.use(['form'], function(){
              var form = layui.form
              	,admin = layui.admin;
              $('form').submit(function(e){
                e.preventDefault();
                $.ajax({
                    type: 'POST',
                    url: "{:url('home/userm/uppwd')}",
                    dataType: 'json',
                    data:$('form').serialize(),
                    success: function(data){
                        if(data.code==1){
                            layer.msg(data.msg,{icon:1,time:1000},function(){
                                location.href="{:url('home/home/index')}";
                            });
                        }else{
                            layer.msg(data.msg,{icon:2,time:1000},function(){

                            });
                        }
                    }
                });    
              })
            });
</script>
<div class="admin-main">
	<div class="layui-card">
		<div class="layui-card-header">修改密码</div>
		<div class="layui-card-body">
			<div class="mt20">
			<form name="form1" id="ajaxForm" class="layui-form"  method="post" action="user.php?m=userinfo">
				<div class="layui-form-item">
					<label class="layui-form-label">原始密码</label>
					<div class="layui-input-inline">
						<input type="password" name="oldpassword" placeholder="原始密码" class="layui-input" lay-verify="required|oldpass"/>
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label">新密码</label>
					<div class="layui-input-inline">
					<input type="password" name="password"  placeholder="新密码" class="layui-input" lay-verify="required|pass"/>
				</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label">重复密码</label>
					<div class="layui-input-inline">
						<input type="password" name="password_confirm" placeholder="重复密码" class="layui-input" lay-verify="required|pass|repass"/>
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label"></label>
					<div class="layui-input-inline">
						<input type="submit" value="立即提交" class="layui-btn layui-btn-normal" lay-submit="">
					</div>
				</div>
			</form>
			</div>
		</div>
	</div>
</div>																	</div>
	</div>
</div>
</body>
</html>